package pt.mleiria.network;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			InputStream is = new FileInputStream("d:/temp/teste.txt");
			OutputStream os = new FileOutputStream("d:/temp/testew.txt");
			int data = is.read();
			while(data != -1){
				System.out.println(data);
				os.write(data);
				data = is.read();
			}
			is.close();
			os.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}

}
